package com.sunkey.generic;

import java.io.Serializable;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;

public abstract class BaseService<M extends Serializable> {
    
    @Lazy
    @Autowired // 必须这个注释，才支持泛型
    private BaseRepository<M> repository;  
    
    public void save(M m) {  
        repository.save(m);  
    }  
}  
